function liActive(a) {
    var a1 = document.getElementById(a);
    var lis = a1.getElementsByTagName('li');
    var $list=$('.list li');
    for (let i = 0; i < lis.length; i++) {
        lis[i].onclick = function () {
            clear();
            lis[i].id = "active";
            bb=this.innerHTML
                //alert(bb)
            /*if (bb=='不限')
            {
                $list.className='';
            }
            else
            {
                $list.className='showd';
            }*/
        }
    }

    function clear() {
        for (let i = 0; i < lis.length; i++) {
            lis[i].id = '';
        }
    }
}
/*function aa(a){
    var a1 = document.getElementById(a);
    var lis = a1.getElementsByTagName('li');
    for (let i=0; i<lis.length;i++) {
        list[i].onclick = function () {
            clear()
            lis[i].class = 'selected'
            bb=this.innerHTML
            alert(bb)
        }
    }
    alert(a)
    function clear(){
        for(let i= 0;i<lis.length;i++){
            lis[i].name = ''
        }
    }
}
aa('list1');
aa('list2');
aa('list3');
*/



liActive('list1');
liActive('list2');
liActive('list3');
